<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width:100px;
            height:100px;
            
        }
    </style>
    <script src="./1.js"></script>
</head>
<body>
    <a href="https://www.baidu.com" id="link" >跳转到百度</a>
     <!-- <div style="width: 100px; background:red;" ></div> -->
    <div id="box" style="background: aqua;"></div>
     <img src="" alt="">
</body>
<script>
    var a= document.getElementById("link");
    console.log(a.getAttribute("href"));
    console.log(a.getAttribute("id"));

    // setInterval(() => {
    //     a.setAttribute("href","https://nmgjdxy.com/")
    // }, 2000);


    // setInterval(() => {
    //     a.setAttribute("href","https://nmgjdxy.com/")
    //     b.setAttribute("style","background:#ccc")
    // }, 2000);

     a.removeAttribute("href")

    var img =document.getElementById("image")
    setInterval(() => {
        img.removeAttribute("src")
    }, 1000);
    
    
</script>
</html>